Page({
    data: {
        navBarHeight: 0,
    },


    onLoad: function (options) {
        const systemInfo = wx.getSystemInfoSync();
        const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
        const navBarHeight = (menuButtonInfo.top - systemInfo.statusBarHeight) * 2 + menuButtonInfo.height;
        const totalTopHeight = systemInfo.statusBarHeight + navBarHeight;
        this.setData({
            statusBarHeight: wx.getSystemInfoSync()?.statusBarHeight || 0,
            navBarHeight: totalTopHeight
        })
    },
});